package org.test.util;

import java.util.Map;

import net.sf.json.JSONArray;

import org.junit.Test;


public class JsonFormat {

	
	public JSONArray outputJSON(Object data)
			throws Exception {
		JSONArray jarray = null;
		try {
			if(data instanceof Object[]){
				jarray = JSONArray.fromObject(data);
			}
			else{
				jarray = JSONArray.fromObject(data);
			}
		} catch (Exception e) {
			throw e;
		} finally {
		}
		return jarray;
	}
	
}
